namespace Mbl.ParameterizedTest.FluentCollectionBuilding.Expectors.StringExpectations
{
    public class EndsWithExpectation : PredicateExpectation<string>
    {
        private readonly string _expectedEnd;

        public EndsWithExpectation(string expectedEnd)
            : base(total => total.EndsWith(expectedEnd))
        {
            _expectedEnd = expectedEnd;
        }

        protected override string GetErrorMessage(string actual)
        {
            return $"Expected '{actual}' to end with '{_expectedEnd}'";
        }
    }
}